function getCbxName(cbx)
{
	var name = cbx.name;
	return name.substr(0,name.length-1);	
}

function cbxClick(cbx,value1,value2)
{
	if (value1 == null) value1 = 1;
	if (value2 == null) value2 = 0;
	var name = getCbxName(cbx);
	setValue(name,cbx.checked ? value1 : value2);
}

function setCbx(cbx,value)
{
	if (cbx != null) {
		var name = getCbxName(cbx);
		setValue(name,value);
		cbx.checked = (value == cbx.value);
	}
}

function setCbxById(id,value)
{
	setCbx(getObj(id),value);
}
/*-------------------------------------------------*/
function doReport(what)
{
	hide(what + "_buttons");
	hide(what + "_list_view");
	show(what + "_report");
}

function cancelReport(what)
{
	show(what + "_buttons");
	show(what + "_list_view");
	hide(what + "_report");
}
